package PTA.javaB;
import java.util.Scanner;
public class ex04 {
    public static void main(String[] args) {
        Scanner sc= new Scanner(System.in);
        String a=sc.next();
     /*查询下一行有没有输入*/   while(sc.hasNext()){
            if(a == "end"){
                break;
            }else{
                if(a.length()%3==0){
                    System.out.printf(a+" ");
                }
            }
            a=sc.next();
        }
    }
}
